Add some docs.
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 15 Mar 2004 01:32:20 +0000 (01:32 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 15 Mar 2004 01:32:20 +0000 (01:32 +0000)
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtkentrycompletion.sgml
gtk/gtkentrycompletion.c

index 053b09acb7ab72adceb06f68cd9935f57e3d51b9..3955fb1aae0fb8751c2786532040dcc352ad5e78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 15 02:36:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): Add
+       some signal docs.
+
 Sun Mar 14 15:38:39 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkentrycompletion.c (gtk_entry_completion_visible_func):
index 053b09acb7ab72adceb06f68cd9935f57e3d51b9..3955fb1aae0fb8751c2786532040dcc352ad5e78 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar 15 02:36:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): Add
+       some signal docs.
+
 Sun Mar 14 15:38:39 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkentrycompletion.c (gtk_entry_completion_visible_func):
index 053b09acb7ab72adceb06f68cd9935f57e3d51b9..3955fb1aae0fb8751c2786532040dcc352ad5e78 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar 15 02:36:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): Add
+       some signal docs.
+
 Sun Mar 14 15:38:39 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkentrycompletion.c (gtk_entry_completion_visible_func):
index 053b09acb7ab72adceb06f68cd9935f57e3d51b9..3955fb1aae0fb8751c2786532040dcc352ad5e78 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar 15 02:36:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): Add
+       some signal docs.
+
 Sun Mar 14 15:38:39 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkentrycompletion.c (gtk_entry_completion_visible_func):
index 053b09acb7ab72adceb06f68cd9935f57e3d51b9..3955fb1aae0fb8751c2786532040dcc352ad5e78 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar 15 02:36:07 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): Add
+       some signal docs.
+
 Sun Mar 14 15:38:39 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkentrycompletion.c (gtk_entry_completion_visible_func):
index b2f5c52fcb7d2d4e96db86f45569eb98c761aed2..5c2c4e82064a78f734a1662db310656f67fcd704 100644 (file)
@@ -1,3 +1,7 @@
+Mon Mar 15 02:36:32 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/tmpl/gtkentrycompletion.sgml: Add some docs.
+
 Tue Mar  9 09:34:10 2004  Owen Taylor  <otaylor@redhat.com>
 
        * === Released 2.3.6 ===
index 7bb0cc98ea5d27493fe99640d4dec8e922e0af27..48f525e9512434c8e6947ce0f991122af499fafc 100644 (file)
@@ -12,6 +12,22 @@ completion functionality for GtkEntry
 #GtkTreeView with completion matches. 
 </para>
 <para>
+"Completion functionality" means that when the user modifies the text 
+in the entry, #GtkEntryCompletion checks which rows in the model match 
+the current content of the entry, and displays a list of matches.
+By default, the matching is done by comparing the entry text 
+case-insensitively against the text column of the model (see 
+gtk_entry_completion_set_text_column()), but this can be overridden with 
+a custom match function (see gtk_entry_completion_set_match_func()).
+</para>
+<para>
+When the user selects a completion, the content of the entry is updated. 
+By default, the content of the entry is replaced by the text column of the 
+model, but this can be overridden by connecting to the ::match-selected signal
+and updating the entry in the signal handler. Note that you should return 
+%TRUE from the signal handler to suppress the default behaviour.
+</para>
+<para>
 To add completion functionality to an entry, use gtk_entry_set_completion().
 </para>
 <para>
index f30cd30459bf473d14d403a8f33f716b11db2a18..0ca623ac2a0d4087da911f50351d061951d85117 100644 (file)
@@ -174,6 +174,19 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
   object_class->get_property = gtk_entry_completion_get_property;
   object_class->finalize = gtk_entry_completion_finalize;
 
+  /**
+   * GtkEntryCompletion::match-selected:
+   * @widget: the object which received the signal
+   * @model: the #GtkTreeModel containing the matches
+   * @iter: a #GtkTreeIter positioned at the selected match
+   * 
+   * The ::match-selected signal is emitted when a match from the list
+   * is selected. The default behaviour is to replace the contents of the
+   * entry with the contents of the text column in the row pointed to by
+   * @iter.
+   *
+   * Return value: %TRUE if the signal has been handled
+   */ 
   entry_completion_signals[MATCH_SELECTED] =
     g_signal_new ("match_selected",
                   G_TYPE_FROM_CLASS (klass),
@@ -184,6 +197,15 @@ gtk_entry_completion_class_init (GtkEntryCompletionClass *klass)
                   G_TYPE_BOOLEAN, 2,
                   GTK_TYPE_TREE_MODEL,
                   GTK_TYPE_TREE_ITER);
+                 
+  /**
+   * GtkEntryCompletion::action-activated:
+   * @widget: the object which received the signal
+   * @index: the index of the activated action
+   *
+   * The ::action-activated signal is emitted when an action
+   * is activated.
+   */
   entry_completion_signals[ACTION_ACTIVATED] =
     g_signal_new ("action_activated",
                   G_TYPE_FROM_CLASS (klass),